//
//  ImageDetailViewController.m
//  USB_Reader
//
//  Created by why on 15-3-24.
//  Copyright (c) 2015年 Tony_Wang. All rights reserved.
//

#import "ImageDetailViewController.h"

@interface ImageDetailViewController ()
@property (nonatomic, retain) UIWebView *myWebView;
@end

@implementation ImageDetailViewController


- (void)dealloc
{

    [_model release];
    [_myWebView release];
    [super dealloc];
    
}



- (void)loadControl
{
    self.myWebView = [[UIWebView alloc] initWithFrame:self.view.bounds];
    NSString *str = [[NSString stringWithFormat:@"http://forum.app.autohome.com.cn/autov4.6/forum/club/topiccontent-a2-pm2-v4.6.0-t%@-o0-p%@-s20-c1-nt0-fs0-sp0-al0-cw360.json HT", self.model.topicid, self.model.pageindex] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    NSLog(@"*********************%@", self.model.pageindex);
    NSURL *url = [NSURL URLWithString:str];
    NSURLRequest *requset = [NSURLRequest requestWithURL:url];
    [self.myWebView loadRequest:requset];
    
    NSLog(@"******%@", url);
    [self.view addSubview:self.myWebView];
    [_myWebView release];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self loadControl];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
